﻿#include "facer.h"

#include "../../include/itframework.h"
#include "../../include/itlogger.h"
#include "../../include/itcommon.h"
extern "C" __declspec(dllexport) ITModelBase* GetInstance(ITFramework *pFrame)
{
    Facer* pFacer = Facer::GetInstance();
    pFacer->SetFramework(pFrame);
    return dynamic_cast<ITModelBase*>(pFacer);
}

void Facer::SetFramework(ITFramework *pFrm)
{
    m_pFramework = pFrm;
    m_pFramework->GetLogger(&m_pLogger);
    m_pFramework->GetCommon(&m_pcommon);
}

Facer::Facer()
{
    qDebug() << "Facer::Facer()";
}

Facer::~Facer()
{
    qDebug() << "Facer::~Facer()";
}

T_BEGIN_MAP(Facer)
    T_HANDLER(PUBLIC_FACER_TEST2_CMD_ID,OnTest1,TPublicFacerTest1Param,TObject)
T_END_MAP

TRESULT Facer::OnTest1(TPublicFacerTest1Param *pInArgs, TObject *pOutArgs)
{
    qDebug() << "facer::ontest1=" << QThread::currentThreadId() << "InArgs=" << pInArgs->szParam1;
    return T_OK;
}

